package com.itheima.factory;

import com.itheima.service.UserService;

public class InstanceFactory {

    //非静态方法: 创建一个对象并返回
    public Object getBean(){

        UserService userService=new UserService() {
            @Override
            public void save() {
                System.out.println("非静态工厂匿名内部类...");
            }
        };
        return userService;
    }
}
